<%@ page language="java" contentType="text/html; charset=EUC-KR"
	pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
	function test() {
		var str = $("#TestForm > input[name='TestText']").val();
		alert(str);
	}
	function onClickEvent(event)
	{
		event = event || window.event;  
	   	var target = event.target || event.srcElement;  
	   	var current = event.currentTarget || event.srcElement || undefined; 
	   	//alert("==>"+current);
	   	//var tr = current.parent();
	   	var s = $("#td1 > input[name='TestText']").val();
	   	alert(s);
	}
</script>
</head>
<body >
	<form id="TestForm">
		<table id="testTable">
			<tr>
				<td id="td1">
					<input type="button" value="a" onclick="onClickEvent()"/>
					<input type="hidden" name="TestText" value="2010" />
				</td>
			</tr>
			<tr>
				<td>
					<input type="button" value="b" onclick="onClickEvent()"/>
					<input type="hidden" name="TestText" value="2011" />
				</td>
			</tr>
		</table>
	</form>
	<input type="button" onclick="test()" />
</body>
</html>